<?php
class Accounts_model extends Admin_Model {
	public $table = ADMIN_USER_TABLE;
	function __construct(){
		
		// set field cần kiểm tra tên
		$this->checkExistField = array(
			'username'	=>	'username',
			'dob'	=>	'dob'
		);
		$this->listImageField = array(
		
		);
	}
	
	function list_accounts($cus=0){
		$this->db->select('*');
		if($cus!=0){
			$this->db->where('custom_permission',0);
		}
		$this->db->order_by('username','ASC');
		$query = $this->db->get($this->table);

		if($query->result()){
			return $query->result();
		}else{
			return false;
		}
	}
}